package com.hgyc.mom.wms.entity;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.annotation.*;

import com.hgyc.mom.common.annotation.Excel;
import com.hgyc.mom.core.mybatis.EQ;
import com.hgyc.mom.core.mybatis.Like;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * <p>
 * 仓库
 * </p>
 *
 * @author fwj
 * @since 2025-05-14
*/
@Data
@TableName("wms_warehouse")
@Schema(name="仓库对象", description="仓库对象")
public class WmsWarehouse implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "仓库ID")
    private Long id;

    @Excel(name = "上级ID")
    @Schema(description = "上级ID")
    private Long parentId;

    @Excel(name = "类型(warehouse、location、area)")
    @Schema(description = "类型(warehouse、location、area)")
    private String type;

    @Excel(name = "仓库编码")
    @EQ
    @Schema(description = "仓库编码")
    private String code;

    @Excel(name = "仓库名称")
    @EQ
    @Schema(description = "仓库名称")
    private String name;

    @Excel(name = "位置")
    @Schema(description = "位置")
    private String location;

    @Excel(name = "面积")
    @Schema(description = "面积")
    private BigDecimal area;

    @Excel(name = "是否开启库位管理")
    @Schema(description = "是否开启库位管理")
    private String areaFlag;

    @Excel(name = "最大载重量")
    @Schema(description = "最大载重量")
    private BigDecimal maxLoa;

    @Excel(name = "是否启用")
    @EQ
    @Schema(description = "是否启用")
    private String enableFlag;

    @Excel(name = "备注")
    @Schema(description = "备注")
    private String remark;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建者")
    private Long createBy;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "更新者")
    private Long updateBy;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private List<WmsWarehouse> children;

}